// NatTravProcessor.h: interface for the CNatTravProcessor class.
//
//////////////////////////////////////////////////////////////////////

#if !defined(AFX_NATTRAVPROCESSOR_H__4081B760_97EE_4717_8326_1708A3824F59__INCLUDED_)
#define AFX_NATTRAVPROCESSOR_H__4081B760_97EE_4717_8326_1708A3824F59__INCLUDED_

#ifdef WIN32
#pragma warning(disable:4786)
#endif

#include "../../source/OS/OSThread.h"
#include "../../source/OS/OSMutex.h"
#include "../rstp/NetReceiver.h"
#include "OSTimer.h"

class CNatTravProcessor : public OSTask  
{
public:
	static CNatTravProcessor& Instance();
	static void DelInstance();

	virtual ~CNatTravProcessor();

	void PushNetpack( PNetDataInfo pNetDataInfo );

private:
	CNatTravProcessor();
	virtual Bool Run();
	Bool GetNetpack(PNetDataInfo pNetDataInfo);
	void Release();
	
	Timer_T m_NatHeartBeatTimer;
	void HandleEvent(MsgData *v_Data);

	OSMutex m_MutexNetpack;
	Q_RECV_COMMPACK m_qNetpack;

private:
	static CNatTravProcessor*	m_Instance;
};

#endif // !defined(AFX_NATTRAVPROCESSOR_H__4081B760_97EE_4717_8326_1708A3824F59__INCLUDED_)
